home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
PROGRAMM
/
DB_CLIPP
/
2614.ZIP
/
CLDOS.ZIP
/
CLDOS.TXT
< prev
next >
Wrap
Text File
|
1990-12-06
|
4KB
|
147 lines
I provide this library for use as is -- to any who want it.
I carry a major greavance in regards to the numerous files I have downloaded
which hinted at the solution to a problem only to find that what I had just
spent 1/2 downloading was a demo -- a partial version -- etc. I wrote these
functions to address a need in my applications as well as out curriosity --
they have served me well. This version of CLDOS.LIB was created for use
with Clipper 5.0. These functions have been tested on machines ranging from
standalone 8086 to networked 386s. I haven't had any problems with them and
as of this writting all known bugs have been addressed -- which is of course
not to say that there aren't any lurking around -- just none that I know of.
Enjoy!
Brent Farmer 71621,627
CLDOS Function descriptions
-----------------------------------------------------------------------------
FUNCTION: numdir(<expC>)
ARGUMENTS:
<expC> is the desired path
RETURNS:
an integer indicating the number of matches.
DESCRIPTION:
Returns number of subdirectories (excluding .. and .)
which match the specified dos search path.
EXAMPLE CALL:
matches = numdir("\*.*")
-----------------------------------------------------------------------------
FUNCTION: isdrive(<expN>)
ARGUMENTS:
<expN> is an integer which coresponds to the drive to test
Drive number 0..25 (0=A:,1=B:,2=C:,etc.)
RETURNS:
Logical value .T. or .F.
DESCRIPTION:
This function checks for the existance of a physical, logical, or
mapped drive.
-----------------------------------------------------------------------------
FUNCTION: getdrive()
ARGUMENTS:
none.
RETURNS:
integer indicating the current drive number (0=A:,1=B:,2=C:, ...).
DESCRIPTION:
This function returns the current drive number.
-----------------------------------------------------------------------------
FUNCTION: setdrive(<expN>)
ARGUMENTS:
<expN> is an integer which coresponds to the drive number to set.
Drive number 0..25 (0=A:,1=B:,2=C:,etc.)
RETURNS:
Logical value .T. or .F.
DESCRIPTION:
This function sets the active drive.
-----------------------------------------------------------------------------
FUNCTION: drives()
ARGUMENTS:
none.
RETURNS:
<expC> a string of valid drive letters.
DESCRIPTION:
This function returns a string of all physical, logical, and mapped drives.
-----------------------------------------------------------------------------
FUNCTION: tempfile()
ARGUMENTS:
none.
RETURNS:
<expC> temporary file name.
DESCRIPTION:
This function creates a uniquely named file in the current directory.
-----------------------------------------------------------------------------
FUNCTION: dir_list(<Char>)
ARGUMENTS:
<Char> Letter indicating the drive to scan.
RETURNS:
<Array> A sorted array of all directory entries on the scanned drive.
DESCRIPTION:
This function returns a sorted list of all directories on a specified drive.
EXAMPLE:
array_of_dir = dir_list("C")
-----------------------------------------------------------------------------
FUNCTION: dirchange(<expC>)
ARGUMENTS:
<expC> DOS pathname.
RETURNS:
Logical value .T. or .F.
DESCRIPTION:
change the current directory.
-----------------------------------------------------------------------------
FUNCTION: dirmake(<expC>)
ARGUMENTS:
<expC> DOS pathname.
RETURNS:
Logical value .T. or .F.
DESCRIPTION:
make a new directory.
-----------------------------------------------------------------------------
FUNCTION: dirremove(<expC>)
ARGUMENTS:
<expC> DOS pathname.
RETURNS:
Logical value .T. or .F.
DESCRIPTION:
remove the specified directory.
-----------------------------------------------------------------------------